#!/usr/bin/env python3
# -*- coding=utf-8 -*-
# 题目：打印出杨辉三角形（要求打印出10行）。


def f1():
    a = []
    t = []
    for i in range(1, 11):
        t.clear()
        for j in range(i):
            if j == 0 or j == i-1:
                t.append(1)
            else:
                t.append(a[-1][j]+a[-1][j-1])
        a.append(t.copy())
    for x in a:
        for y in x:
            print(y, end=' ')
        print()


f = f1
if __name__ == "__main__":
    f()
